<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="../../css/reset.css">
    <link rel="stylesheet" href="../../css/index.css">
</head>
<body>
<header>
    <h1>二狗子的Blog</h1>
    <h4>划船不用浆</h4>
</header>
<nav>
    <ul>
        <?php foreach($cats as $c){ ?>
        <li><a href="index.php?cat_id=<?php echo $c['cat_id'];?>"><?php echo $c['cat_name'];?></a></li>
        <?php } ?>
    </ul>
</nav>
<div id="main">
    <div id="lside">
        <?php foreach($arts as $a){ ?>
        <article>
            <h2><a href="art.php?id=<?php echo $a['art_id']; ?>"><?php echo $a['title']; ?></a></h2>
            <div class="entry_header">
                <time><?php echo date('Y-m-d',$a['pubtime']); ?></time>
                by
                <a href="#">二狗子</a>
                <a class="catlink" href="#"><?php echo $a['cat_name']; ?></a>
                <a class="comment" href="#"><?php echo $a['comm']; ?></a>
            </div>
            <div class="entry_content">
                <?php if(isset($a['thumb_path'])) {?>
                <img src="<?php echo $a['thumb_path']; ?>">
                <?php }?>
                <?php echo mb_substr($a['content'],0,10).'...'; ?>
            </div>
        </article>
        <?php } ?>
        <div id="pagebar">
            Pages:&nbsp;
            <?php foreach($pages as $k=>$v) {  if($k==$currentPage) { echo $k; }else{ ?>
            <a href="index.php?<?php echo $v; ?>"><?php echo $k; ?></a>
            <?php }} ?>
        </div>
    </div>
    <div id="rside">
        <aside>
            <form action="">
                <input type="text" name="search" placeholder="Search...">
            </form>
        </aside>
        <aside>
            <h4>测试标题</h4>
            <ul>
                <li><a href="">文章标题</a>&nbsp;(1)</li>
                <li><a href="">文章标题</a>&nbsp;(3)</li>
                <li><a href="">文章标题</a>&nbsp;(5)</li>
                <li><a href="">文章标题</a>&nbsp;(3)</li>
            </ul>
        </aside>
        <aside>
            <h4>测试标题</h4>
            <ul>
                <li><a href="">文章标题1</a></li>
                <li><a href="">文章标题2</a></li>
                <li><a href="">文章标题3</a></li>
                <li><a href="">文章标题4</a></li>
            </ul>
        </aside>
        <aside>
            <h4>测试标题</h4>
            <ul>
                <li><a href="">文章标题1</a></li>
                <li><a href="">文章标题2</a></li>
                <li><a href="">文章标题3</a></li>
                <li><a href="">文章标题4</a></li>
            </ul>
        </aside>
        <aside>
            <h4>测试标题</h4>
            <ul>
                <li><a href="">文章标题1</a></li>
                <li><a href="">文章标题2</a></li>
                <li><a href="">文章标题3</a></li>
                <li><a href="">文章标题4</a></li>
            </ul>
        </aside>
    </div>
</div>
<footer>
    Copyright &copy; 2015 · GeneratePress · WordPress
</footer>
</body>
</html>